<?php

get_instance()->load->model('petitions/Vote');
$c = 0;
while (! $list = get_instance()->Vote->returnVotesAfterDate($last)) {
	sleep(1);
	$c++; 
	if ($c == 5) {
		$data ='No items';
		echo json_encode($data);
		return;	
	}
}
$return = "";
foreach($list as $vote){
	$return .= get_instance()->load->view('common/recent_vote_li', $vote,TRUE);
}
echo $return;

